/*
 *  Particle.h
 *  GLRender
 *
 *  Created by Matthias on 5/26/10.
 *  Copyright 2010 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef PARTICLESYSTEM_H
#define PARTICLESYSTEM_H

#include <vector>
#include "Base.h"

typedef struct particlePart{
			Point3d position;
			Point3d speed;
			RGBd color;
			double alpha;
			int fuel;
		} particlePart;


class ParticleSystem{


private:
	int quantity, radius, fuel;
	Point3d speed;
	Point3d center;
	RGBd color;
	std::vector<particlePart> particles;
	
	Point3d newPosition();
	double newRandom();
	void displayPoint();
	
	
public:
	ParticleSystem(){};
	
	ParticleSystem(const RGBd &color, const int quantity, const int radius);
	
	virtual ~ParticleSystem(){};
	
	void display();
	
	void setCenter(const Point3d &center);
	
	void setDirection(const Point3d &dir);
	
	const particlePart createParticle();

};

#endif
